package com.ql.controller;

import com.ql.domain.response.JsonResult;
import com.ql.domain.request.DeviceMonitoringQuery;
import com.ql.service.DeviceMonitoringService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/deviceMonitoring")
public class DeviceMonitoringController {
    @Autowired
    DeviceMonitoringService deviceMonitoringService;

    @RequestMapping("/findAll.do")
    @ResponseBody
    public JsonResult findAll(DeviceMonitoringQuery deviceMonitoringQuery, @RequestParam(name = "page", required = true, defaultValue = "1") Integer page, @RequestParam(name = "limit", required = true, defaultValue = "10") Integer limit) {
        return deviceMonitoringService.findAll(deviceMonitoringQuery,page,limit);
    }
}
